-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: labeler logic #1
Conversation
LGTM, nice! |
Ready for review |
LGTM. Thank you very much 🥳 ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, you could move the logic into dedicated functions but for now it's readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few remarks.
Description
This pr implements a crossplane function, which allows any user to create a project scoped logging resource. It transforms a namespaced
logging.caas.telekom.de
resource into a clusterlevellogging.banzaicloud.io
resource and ensure the created logging instance is scoped to the project in which the caas logging resource was created. For this two things need to be ensured:Implementation
field.cattle.io/projectId
from that namespace.Testing locally
Install the crossplane cli
In one bash session start the function:
This runs the function locally, using your current kubectl context to lookup the namespaces.
Invoke the function with a logging.caas.telekom.de Composite Resource:
cd examples/ crossplane beta render xr.yaml composition.yaml functions.yaml
This does not create any resources, it only invokes the function in the same way crossplane would, when actually deployed.
Running Tests
go test ./...
Example
I've deployed the function on my kind cluster. You can find an example that a user would create and its result below:
External Resources
Function Docs
Go example